package fr.uvsq.isty.bdh.hchess.interfacing;

/**
 * Non understood events shall be ignored.
 * @author Clement Bellot <clementbellot@gmail.com>
 */
public enum GameEvent {
    /**
     * Can be sent by the white's player to the referee.
     * It may also be sent to the black's player by the referee if the
     * white's player asked for a draw. In this case, if the draw is accepted,
     * the black's player should send BLACK_ACCEPTED_DRAW. BLACK_REFUSED_DRAW
     * shall be sent if the draw is refused.
     */
    WHITE_ASKED_DRAW,
    WHITE_CANCELED_DRAW,
    BLACK_ACCEPTED_DRAW,
    BLACK_REFUSED_DRAW,
    /**
     * Can be sent by the white's player to the referee.
     * It may also be sent to the black's player by the referee if the
     * black's player surrendered.
     */
    WHITE_SURRENDERED,
    /**
     * Same as the WHITE_ASKED_DRAW, but the other way around.
     */
    BLACK_ASKED_DRAW,
    BLACK_CANCELED_DRAW,
    WHITE_ACCEPTED_DRAW,
    WHITE_REFUSED_DRAW,
    /**
     * Same as the WHITE_SURRENDERED, but the other way around.
     */
    BLACK_SURRENDERED,
    // These shall not be sent by players, only by referee to players.
    WHITE_CHECKMATE,
    BLACK_CHECKMATE,
    WHITE_BAD_MOVE,
    BLACK_BAD_MOVE,
    WHITE_LOST_CONNECTION,
    BLACK_LOST_CONNECTION,
    DRAW_BY_AGREEMENT,
    STALEMATE,
    IMPOSSIBILITY_OF_CHECHMATE,
    FIFTY_MOVE_RULE,
    THREEFOLD_REPETITION,
    WHITE_OUT_OF_TIME,
    BLACK_OUT_OF_TIME,
    /**
     * This one shall be sent only from the referee when it exits, to the
     * gameDump pipe.
     */
    REFEREE_EXITING,
    REFEREE_STATE_RESTORED,
}
